package com.my.cp1;

import android.app.ListActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.Contacts.People;
import android.widget.ListAdapter;
import android.widget.SimpleCursorAdapter;


public class cp1 extends ListActivity {
	/** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) 
  {
      super.onCreate(savedInstanceState);
      Cursor c = getContentResolver().query(People.CONTENT_URI, null, null, null, null);
      
      ListAdapter adapter = new SimpleCursorAdapter(this, android.R.layout.simple_expandable_list_item_2,c,new String[]{People.NAME, People.NUMBER},new int[] {android.R.id.text1,android.R.id.text2});
      setListAdapter(adapter);
      }
  }
